<?php
$database=mysql_real_escape_string($database);
$q=$db->prepare("select count(*) from information_schema.tables where table_schema=`$database`");
$q->execute();
echo$q->fetchColumn().'****';
/*$exists=($q->fetchColumn()==$table);
echo$exists?'found ':'didnt find ',$table,'<br/>';*/

/*
unset($table);
unset($q);
*/

/*
);
select schema_name from information_schema.schemata where table_schema=$database and schema_name=*
select count(*) from information_schema.tables where table_schema=$database
*/
?>

